package edu.sctu.xialei.May.day20150518two.String_ArrayList;


import java.util.ArrayList;

/**
 * Created by Administrator on 2015/5/18 0018.
 */
public class StringArray {

    public String[] arrayList (){


        ArrayList<String> List = new ArrayList<String>();

        for (int i = 0; i < 5; i++) {
            List.add("夏磊" + (i + 1));
        }

        String[] values = new String[List.size()];

        for (int i = 0; i < List.size(); i++) {
            values[i] = List.get(i);
        }

        return values;
    }

    public void printer (String[] string){
        for (int i = 0; i < string.length; i++) {
            System.out.println(string[i]);
        }
    }

}
